<template>
  <el-config-provider :locale="locale">
    <NuxtLayout>
      <!-- <NuxtWelcome /> -->
      <NuxtPage />
    </NuxtLayout>
  </el-config-provider>
</template>

<script setup lang="ts">
import zhCn from 'element-plus/dist/locale/zh-cn.mjs';
import en from 'element-plus/dist/locale/en.mjs';
const isDark = useDark();

const language = ref('zh-cn');
const locale = computed(() => (language.value === 'zh-cn' ? zhCn : en));
// import { ElMessage, ElNotification } from 'element-plus';
onErrorCaptured((error) => {
  console.error(error);
  useErrorTip(error.message);
  // ElMessage({
  //   // title: 'Error',
  //   message: h('p', {}, error.message),
  //   type: 'error',
  //   appendTo: '#__nuxt',
  // });
  return false;
});
</script>
